package com.ruoyi.common.utils;


import lombok.Data;
import org.jsoup.nodes.Document;

import java.util.Map;
@Data
public class HttpResponse {
    private Document document;
    private Map<String, String> cookieMap;
    private Integer statusCode;
    private Boolean isSuccess;
    private String query;
    private String host;
    private String body;
    private String cookie;

    private String location;
    private String message;



    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof HttpResponse)) {
            return false;
        } else {
            HttpResponse other = (HttpResponse)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$document = this.getDocument();
                Object other$document = other.getDocument();
                if (this$document == null) {
                    if (other$document != null) {
                        return false;
                    }
                } else if (!this$document.equals(other$document)) {
                    return false;
                }

                Object this$cookieMap = this.getCookieMap();
                Object other$cookieMap = other.getCookieMap();
                if (this$cookieMap == null) {
                    if (other$cookieMap != null) {
                        return false;
                    }
                } else if (!this$cookieMap.equals(other$cookieMap)) {
                    return false;
                }

                Object this$statusCode = this.getStatusCode();
                Object other$statusCode = other.getStatusCode();
                if (this$statusCode == null) {
                    if (other$statusCode != null) {
                        return false;
                    }
                } else if (!this$statusCode.equals(other$statusCode)) {
                    return false;
                }

                label62: {
                    Object this$isSuccess = this.getIsSuccess();
                    Object other$isSuccess = other.getIsSuccess();
                    if (this$isSuccess == null) {
                        if (other$isSuccess == null) {
                            break label62;
                        }
                    } else if (this$isSuccess.equals(other$isSuccess)) {
                        break label62;
                    }

                    return false;
                }

                label55: {
                    Object this$query = this.getQuery();
                    Object other$query = other.getQuery();
                    if (this$query == null) {
                        if (other$query == null) {
                            break label55;
                        }
                    } else if (this$query.equals(other$query)) {
                        break label55;
                    }

                    return false;
                }

                Object this$host = this.getHost();
                Object other$host = other.getHost();
                if (this$host == null) {
                    if (other$host != null) {
                        return false;
                    }
                } else if (!this$host.equals(other$host)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof HttpResponse;
    }

    public int hashCode() {
        //int PRIME = true;
        int result = 1;
        Object $document = this.getDocument();
        result = result * 59 + ($document == null ? 43 : $document.hashCode());
        Object $cookieMap = this.getCookieMap();
        result = result * 59 + ($cookieMap == null ? 43 : $cookieMap.hashCode());
        Object $statusCode = this.getStatusCode();
        result = result * 59 + ($statusCode == null ? 43 : $statusCode.hashCode());
        Object $isSuccess = this.getIsSuccess();
        result = result * 59 + ($isSuccess == null ? 43 : $isSuccess.hashCode());
        Object $query = this.getQuery();
        result = result * 59 + ($query == null ? 43 : $query.hashCode());
        Object $host = this.getHost();
        result = result * 59 + ($host == null ? 43 : $host.hashCode());
        return result;
    }

    public String toString() {
        return "HttpResponse(document=" + this.getDocument() + ", cookieMap=" + this.getCookieMap() + ", statusCode=" + this.getStatusCode() + ", isSuccess=" + this.getIsSuccess() + ", query=" + this.getQuery() + ", host=" + this.getHost() + ")";
    }
}
